//package org.vaadin.example.cfg;
//
//import java.util.Arrays;
//import java.util.Collections;
//import java.util.List;
//import java.util.Locale;
//import org.springframework.stereotype.Component;
//import com.vaadin.flow.i18n.I18NProvider;
//import org.vaadin.example.util.I18nUtil;
//
///**
// * Simple implementation of {@link I18NProvider}.
// */
//@Component
//public class SimpleI18NProvider implements I18NProvider {
//
//    @Override
//    public List<Locale> getProvidedLocales() {
//        return Collections.unmodifiableList(
//                Arrays.asList(Locale.ENGLISH, Locale.CHINESE));
//    }
//
//    @Override
//    public String getTranslation(String key, Locale locale, Object... params) {
//        System.out.println(locale);
////        if (Locale.ENGLISH.equals(locale)) {
////            if (key.equals("root.navigate_to_component")) {
////                return "Navigate to another component";
////            }
////        } else if (Locale.CHINESE.equals(locale)) {
////            if (key.equals("root.navigate_to_component")) {
////                return "前往另一视图";
////            }
////        }
//
//        return I18nUtil.getMessage(key, locale);
////        return null;
//    }
//
//}
